<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <script>
        function copyText() {
            const url = document.getElementById("field1").value;
            const name = document.getElementById("field2").value;
            const aa = document.createElement("a");
            aa.innerHTML = name;
            aa.href = url;
            aa.target = "_blank";
            document.body.appendChild(aa);
            const br = document.createElement("br");
            document.body.appendChild(br);
        }
    </script>
</head>

<body>
    超链接: <input type="text" id="field1" value="ctripglobal://">
    <br>
    名字: <input type="text" id="field2">
    <br>
    <button onclick="copyText()">添加</button>
    <br>
    <a href="ctripglobal://FlightSearch" target="_blank">机票首页</a>
    <br>
    <a href="ctripglobal://FlightStatus?org=221" target="_blank">航班动态</a>
    <br>
    <a href="ctripglobal://WebView?url=https://hk.fat1.qa.nt.tripqate.com/travel-restrictions-covid-19?locale=zh_HK"
        target="_blank">covid webview未encode</a>
    <br>
    <a href="ctripglobal://WebView?url=https%3A%2F%2Fhk.fat1.qa.nt.tripqate.com%2Ftravel-restrictions-covid-19%3Flocale%3Dzh_HK"
        target="_blank">covid webview已encode</a>
    <br>
</body>

</html>